package com.hm.system.auto;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Getter;
import lombok.Setter;

/**
 * @author shishun.wang
 * @date 上午10:05:42 2016年5月16日
 * @version 1.0
 * @describe
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "com.hm.system.auto")
public class SystemProperties {
	
	private String platformName;
	
	private String osName;
	
	private List<String> skipFilterValidate = new ArrayList<String>();
	
	private BaseConfig baseConfig = new BaseConfig();

	private FileUpload fileUpload = new FileUpload();
	
	private HttpInvokerService httpInvokerService = new HttpInvokerService();
	
	private BaiduUe baiduUe = new BaiduUe();
	
	private SystemInit systemInit = new SystemInit();
	
	private LogConfig logConfig = new LogConfig();
	
	@Getter
	@Setter
	public class LogConfig{
		
		private boolean req;
		
		private boolean operation;
		
		private boolean create;
		
		private boolean del;
		
		private boolean modify;
		
	}
	
	@Getter
	@Setter
	public class SystemInit{
		
		private String authorization;
		
		private String name;
		
		private String pwd;
		
		private String mobile;
		
		private String alias;
	}
	
	@Getter
	@Setter
	public class BaiduUe{
		
		private String imageUrl;
		
	}
	
	@Getter
	@Setter
	public class HttpInvokerService{
		
		private String recycle;
		
		private String email;
	}
	
	@Getter
	@Setter
	public class BaseConfig {
		/**
		 * 版本
		 */
		private String version;

		/**
		 * 跨域访问
		 */
		private String accessControlAllowOrigin;
		
	}

	@Getter
	@Setter
	public class FileUpload {

		/**
		 * 临时文件目录
		 */
		private String tempFilePath = "/opt/ibsm/temp";

		/**
		 * 原文件路径
		 */
		private String originalFilePath = "/opt/ibsm/upload";

		/**
		 * 文件最大值
		 */
		private long fileMaxSize = 1024 * 1024 * 1024;

	}

}
